package com.zuihai.app.mvp.ui.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.zuihai.app.R;
import com.zuihai.app.mvp.model.entity.Detail;
import com.zuihai.app.mvp.ui.holder.BaseViewHolderWraper;
import com.zuihai.app.mvp.ui.holder.DetailPictureRecommentHolder;

import java.util.List;

/**
 * Created by Administrator on 2017/5/12 0012.
 */

public class DetailPictureRecommendAdapter extends BaseQuickAdapter<Detail.Recommend, BaseViewHolderWraper> {

    public DetailPictureRecommendAdapter(List<Detail.Recommend> infos) {
        super(infos);
    }

    @Override
    protected BaseViewHolderWraper onCreateDefViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(mContext).inflate(R.layout.layout_item_detail_picture_recomment, parent, false);
        return new DetailPictureRecommentHolder(view);
    }

    @Override
    protected void convert(BaseViewHolderWraper helper, Detail.Recommend item) {
        helper.fillData(item, helper.getAdapterPosition());
    }
}
